import java.util.Random;
import java.util.Scanner;

public class csz0921 {
    //猜数字游戏
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        Random random=new Random();
        int randNum = random.nextInt(100);
        while(true){
            System.out.println("请输入你所猜的数字：");
            int num=sc.nextInt();
            if(num<randNum){
                System.out.println("猜小了");
            } else if (num>randNum) {
                System.out.println("猜大了");
            }else{
                System.out.println("恭喜你，猜对了！");
                break;
            }
        }
    }


}
